<div id="content-header">
    <div id="breadcrumb"> <a  title="Go to Home" class="tip-bottom"><i class="icon-home"></i> 人事行政</a> 
    	<a ui-sref="home.structure" class="current">组织架构</a> </div>
  </div>
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
 
			<div class="widget-box">
          <div class="widget-content nopadding">
          		<div style="float: left; width: 20%;">
          			
          			  <div save-content="rightclick-html">
                        <treecontrol class="tree-classic"
			                       tree-model="treedata"
							     expanded-nodes="expandedNodes"
			                                     on-selection="doSelect(node)"
							     on-right-click="doRightClick(node)"
							     menu-id="ctxMenu">
			                            {{node.label}}
                       </treecontrol>	

			
                        <ul id="ctxMenu" class="dropdown-menu">
                          <li><a ng-click="columnAdd('','add')" 
                                 ng-class="isLeaf() ? '' : 'disabled'">添加部门</a></li>
                          <li class="divider"></li>  
                          <li><a ng-click="columnAdd('','upd')" 
                                 ng-class="isLeaf() ? '' : 'disabled'">编辑部门</a></li>
                          <li class="divider"></li>  
                          <li><a ng-click="modelClickTree()" 
                                 ng-class="isLeaf() ? '' : 'disabled'">删除部门</a></li>
                          <!--<li><a context-submenu-id="ctxSubMenuOrange"
				 ng-class="selectedFood.color == 'Orange' ? '' : 'disabled'">编辑部门</a></li>
                          <li><a context-submenu-id="ctxSubMenuGreen"
				 ng-class="selectedFood.color == 'Green' ? '' : 'disabled'">删除部门</a></li>-->
                        </ul>


                        <ul id="ctxSubMenuOrange" class="dropdown-menu">
                          <li><a ng-click="doAction('juice' + selectedFood.name)">Juice {{selectedFood.name}}</a></li>
                          <li><a ng-click="doAction('peel orange food')">Peel Orange Food</a></li>
                        </ul>


                        <ul id="ctxSubMenuGreen" class="dropdown-menu">
                          <li><a ng-click="doAction('chop' + selectedFood.name)">Chop {{selectedFood.name}}</a></li>
                          <li><a ng-click="doAction('shred green food')">Shred Green Food</a></li>
                        </ul>
                    </div>
                
                
          			
          		</div>
                <div  style="float: left; width: 80%;"">
                	
                	  <table class="table table-bordered data-table">
              <thead>
                <tr>
                  <th width="10%" >编号</th>
                  <th width="20%">姓名</th>
                  <th width="20%">手机号</th>
                  <th width="20%">邮箱</th>
                  <th width="10%">状态</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
                <tr class="gradeX" bindonce ng-repeat="o in list">
                  <td bo-text="o.sSerialNum"></td>
                  <td bo-text="o.sName"></td>
                  <td bo-text="o.sTelephone"></td>
                  <td bo-text="o.sEmail"></td>
                  <td bo-text="o.statusName"></td>
                  <td>
                  	<button  ui-sref="home.addupdate({id:o.sId,page:pageNum,url:'structure'})" class="btn  btn-primary">修改</button>
                  	<button class="btn  btn-danger" ng-click="modelClick(o.sId)">删除</button>
                  </td>
                </tr>
                 <tr class="gradeX"  ng-if="totalSize==0||totalSize==undefined"  class="even">
	            	<td colspan="8"> 暂无数据</td>
	           	</tr>
              </tbody>
            </table>
            
             <div class="fy" ng-if="totalSize>0">
									<p>共<span>{{totalSize}}</span>条记录，<span>{{pageNum}}</span>/<span>{{totalNum}}</span>页</p>
									<ul uib-pagination 
										first-text="首页" 
										last-text='末页' 
										next-text='下一页' 
										previous-text='上一页' 
										total-items="totalSize" 
										items-per-page='pageSize' 
										boundary-link-numbers='true' 
										max-size='3' boundary-links='true' 
										ng-model="$parent.tj.current" 
										ng-change='search(tj.current)'>
									</ul>
									<p>到第<input placeholder="{{pageNum}}" ng-change="pageUp()" ng-model="$parent.tj.page" />页</p>
									<span ng-click="toPage($parent.tj.page)">前往</span>
			</div>
                	
               
                
                </div>                        
          </div>
        </div>
      </div>
  </div>
<script type="text/ng-template" id="columnAdd.html">
			<style>
				.modal-content{
					width: 751px;
					margin-left: 80px;
				}
				.table_input{
					width:256px;text-indent: .1rem;height: 36px;
				}
				.table_span{
					display: block;width:100px;
				}
				
			</style>
			<div class="modal-header" style="text-align: center;font-size: 24px;background: #4092E8;color: white;height:50px;line-height: 50px">
				<div style="margin-top: -8px;">
					{{sername}}
				</div>
				<button style="color:white;float: right;background: #4092e8;border: none;outline: none;box-shadow: none;margin-top: -35px;" class="btn " type="button" ng-click="cancel()">[关闭]</button>
			</div>
			<div class="modal-body" >
				<div class="adduser" >

					<div style="    margin-left: 80px;">
						<form novalidate="novalidate" name="form">
							<div style="margin: 1rem 0;display: flex;align-items: center;">
								<span class="table_span" >部门名称：</span>
								<input class="table_input"    type="text" value="" name="name" ng-model="name" required>
								<span class="error bigError "  ng-show="form.name.$error.required" style="font-size: 18px;font-weight: bold;">*</span>
							</div>
							<div style="margin: 1rem 0;display: flex;align-items: center;">
								<span class="table_span">部门描述：</span>
								<textarea ng-model="dgDecription" rows="3" cols="50">
								</textarea>
							</div>
						</form>

					</div>
				</div>
			</div>
			<div class="modal-footer" style="position: relative;height:50px;">
				<div style="display: flex;justify-content: flex-end;padding: 0;position: absolute;right: 20px;top: 0.1rem;">
					
					<button  class="" ng-disabled="form.$invalid" ng-class="{true:'btn btn-primary'}[form.$invalid]" 
						style="width: 100px;border-radius: 0;line-height: 32px;background-color:#4092e8 ;border:#4092e8 ; font-size: 13px;color: white;font-size: 14px;margin-top: 5px;"
						ng-click="ok(form.$invalid)">保 存</button>
				</div>
			</div>
		</script>
